﻿@model HdipCricketClub.ViewModels.ViewTeamViewModel

@{
    ViewBag.Title = "ViewTeam";
}

<h2>Team Selected</h2>

<fieldset>
<legend>Fixture</legend>
<br />
    @Html.DisplayFor(ModelItem => Model.TeamFixture.Team.Club.ShortName) @Html.DisplayFor(ModelItem => Model.TeamFixture.Team.name)
    vs @Html.DisplayFor(ModelItem => Model.TeamFixture.Opponent.club_name) @Html.DisplayFor(ModelItem => Model.TeamFixture.Opponent.team_name)<br />
    on @Html.DisplayFor(ModelItem => Model.TeamFixture.date)
    
    @if (Model.TeamFixture.home)
    {
        @Html.Raw(" ");
        @:at home.
    }
    @if (!Model.TeamFixture.home)
    {
        @Html.Raw(" ");
        @:away.
    }

<br />
</fieldset>

<table>
    <tr>
        <th>
            Name:
        </th>
        <th>
            contacted
        </th>
        <th>
            confirmed
        </th>
        <th></th>
    </tr>

@foreach (var item in Model.Team)
{
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Member.FirstAndLastName)
        </td>
        <td class="column-checkbox">
            @Html.DisplayFor(modelItem => item.contacted)
        </td>
        <td class="column-checkbox">
            @Html.DisplayFor(modelItem => item.confirmed)
        </td>
    </tr>
}

</table>

<p>
    @Html.ActionLink("View Another Team", "GetFixtures", "Team")  |
    @Html.ActionLink("Return to Home Page", "Index", "Home")
</p>